import { confSysCodeApi } from '@src/apis/invoiceApis';
import { useEffect, useState } from 'react';

export const useCinfSysCode = (res?: string) => {
  const [confSysCode, setConfSysCode] = useState<any>([]);
  useEffect(() => {
    console.log({ confSysCodeApi: res || 'productItemType' });
    confSysCodeApi({ codeType: res || 'productItemType' }).then((result: any) => {
      setConfSysCode(result.data);
    });
  }, []);
  return { confSysCode, setConfSysCode };
};
